'use strict';

const Service = require('egg').Service;

class HomeService extends Service {
  // 首页轮播图
  async banners() {
    const res = await this.app.mysql.select('banner');
    return res;
  }
  // 首页菜单
  async menus() {
    const res = await this.app.mysql.select('menu');
    return res;
  }
  // 首页导航栏
  async navs() {
    const res = await this.app.mysql.select('home_nav');
    return res;
  }
}

module.exports = HomeService;
